<extend name="admin/main"/>

<block name="title">
    <title>Profile</title>
</block>

<block name="css">
</block>

<block name="heading">Profile</block>

<block name="content">
    <div class="row">
        <div class="col-md-offset-3 col-md-6">
            <div class="panel panel-primary">
                <div class="panel-heading text-uppercase">Profile</div>
                <form class="panel-body" method="post" action="/admin/adminIndex/updateProfile"
                      enctype="multipart/form-data">
                    <div class="text-center">
                        <img src="{$user->avatar}" width="75" style="margin-top: 5px" height="75" class="img-circle">
                    </div>
                    <input type="hidden" value="{$user->id}" name="id">
                    <div class="form-group">
                        <label for="username">username</label>
                        <input type="text" class="form-control" id="username" name="username"
                               value="{$user->username}" required>
                    </div>
                    <div class="form-group">
                        <label for="email">email</label>
                        <input type="email" class="form-control" id="email" name="email" value="{$user->email}"
                               required>
                    </div>
                    <div class="form-group">
                        <label for="password">Password</label>
                        <input type="password" class="form-control" id="password" name="password">
                    </div>
                    <div class="form-group">
                        <label for="age">年龄</label>
                        <input type="tel" class="form-control" id="age" name="age" value="{$user->age}" required>
                    </div>
                    <div class="form-group">
                        <label for="avatar">头像</label>
                        <input type="file" class="form-control" id="avatar" name="avatar">
                    </div>
                    <div class="form-group">
                        <label>性别</label>
                        <div class="col-sm-12">
                            <label class="control-labe">
                                <input type="radio" name="sex" value="0" {$user->sex == 0 ? 'checked' : ''}> 女
                            </label>
                            <label>
                                <input type="radio" name="sex" value="1" {$user->sex == 1 ? 'checked' : ''}> 男
                            </label>
                        </div>
                    </div>
                    <div class="form-group">
                        <input type="submit" class="btn-block btn btn-success">
                    </div>
                </form>
            </div>
        </div>
    </div>
</block>

<block name="js">
    <script type="text/javascript" src="__PUBLIC__/assets/demo/demo.js"></script>
    <script type="text/javascript" src="__PUBLIC__/assets/demo/demo-switcher.js"></script>
    <script type="text/javascript" src="__PUBLIC__/assets/plugins/bootbox/bootbox.js"></script>
    <script src="__PUBLIC__/assets/plugins/form-pagedown/js/jquery.pagedown-bootstrap.combined.js"></script>
    <script>
        $(document).ready(function () {

        });
    </script>
</block>
